/*
 * @Author: 张小平
 * @Date:   2025-05-01 
 * @Email:  qqshuqian@163.com 
 * @Copyright © 2024 aseyun. All rights reserved.
 */
const flowPath = {
  SAVE: '/simple/save'
}

const template = {
  complete: '你发起的${title}事项审批通过，请尽快查看！',
  reject: '你发起的${title}事项审批未通过，请尽快查看！',
  return: '你发起的${title}事项被退回，请尽快查看！',
  task: '${startUserName}发起的${title}事项，流转到${currTaskName}环节，请尽快办理！',
  cc: '${startUserName}发起的${title}事项，抄送了一份给您，请查阅！'
}

const nodeType = {
  STARTTASK: 'STARTTASK',
  USERTASK: 'USERTASK',
  CCTASK: 'CCTASK',
  BRANCHTASK: 'BRANCHTASK',
  ROUTE: 'ROUTE'
}

const branchType = {
  startUser: 'procStartUser',
  number: 'number',
  radio: 'radio',
  select: 'select',
  role: 'role',
  org: 'org'
}

const itemType = {
  todo: 'TODO',
  cc: 'CC',
  start: 'START'
}

const assignType = {
  t1: 'assignMember',
  t2: 'fieldContactPerson',
  t3: 'procStartUser',
  t4: 'role'
}

const suffix = '_newNode'

const rootNodes = {
  id: `1${suffix}`,
  pid: null,
  personList: null, // 提交人
  type: 'STARTTASK',
  childList: [{
    id: `11${suffix}`,
    pid: `1${suffix}`,
    personList: [], // 办理人
    type: 'USERTASK',
    childList: [{
      id: `111${suffix}`,
      pid: `11${suffix}`,
      personList: [], // 抄送人
      type: 'CCTASK',
      childList: []
    }]
  }, {
    id: `12${suffix}`,
    pid: `1${suffix}`,
    personList: [], // 办理人
    type: 'USERTASK',
    childList: [{
      id: `121${suffix}`,
      pid: `12${suffix}`,
      personList: [], // 抄送人
      type: 'CCTASK',
      childList: []
    }]
  }]
}

const rootNodes2 = {
  id: `1${suffix}`,
  pid: null,
  personList: null, // 提交人
  type: 'STARTTASK',
  child: {
    id: `11${suffix}`,
    pid: `1${suffix}`,
    type: 'USERTASK',
    taskName: '办理start',
    child: {
      id: `111${suffix}`,
      pid: `11${suffix}`,
      type: 'ROUTE',
      conditions: [{
        id: `1111${suffix}`,
        pid: `111${suffix}`,
        type: 'BRANCHTASK',
        taskName: '条件11',
        child: {
          id: `11111${suffix}`,
          pid: `1111${suffix}`,
          type: 'USERTASK',
          child: {
            id: `111111${suffix}`,
            pid: `11111${suffix}`,
            type: 'CCTASK'
          }
        }
      }, {
        id: `1112${suffix}`,
        pid: `111${suffix}`,
        type: 'BRANCHTASK',
        child: {
          id: `aaa`,
          pid: `1112${suffix}`,
          type: 'ROUTE',
          conditions: [{
            id: `1111`,
            pid: `aaa`,
            type: 'BRANCHTASK',
            taskName: '条件11'
          }, {
            id: `1112`,
            pid: `aaa`,
            type: 'BRANCHTASK'
          }]
          // child: {
          //   id: `112`,
          //   pid: `aaa`,
          //   type: 'ROUTE',
          //   conditions: [{
          //     id: `1121`,
          //     pid: `112`,
          //     type: 'BRANCHTASK',
          //     taskName: '条件1121'
          //   }, {
          //     id: `1122`,
          //     pid: `112`,
          //     type: 'BRANCHTASK',
          //     taskName: '条件1122'
          //   }]
          // }
        }
      }],
      // 结尾节点
      child: {
        id: `112${suffix}`,
        pid: `111${suffix}`,
        type: 'CCTASK',
        taskName: '抄送111',
        child: {
          id: `1121${suffix}`,
          pid: `112${suffix}`,
          taskName: '办理123',
          type: 'USERTASK'
        }
      }
    }
  }
}



export {
  flowPath,
  template,
  rootNodes,
  rootNodes2,
  nodeType,
  itemType,
  branchType,
  suffix,
  assignType
}
